﻿using System;
using System.Drawing;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Windows.Forms;

namespace SuSPExtension
{
	// Token: 0x0200000A RID: 10
	public class SystemWindow
	{
		// Token: 0x06000017 RID: 23 RVA: 0x000026D9 File Offset: 0x000008D9
		public SystemWindow(string hmd)
		{
			this._hwnd = (IntPtr)int.Parse(hmd);
			SystemWindow.Start_Cur_STYLE = SystemWindow.GetWindowLong(this._hwnd, -20);
		}

		// Token: 0x06000018 RID: 24 RVA: 0x00002704 File Offset: 0x00000904
		public SystemWindow(IntPtr hmd)
		{
			this._hwnd = hmd;
			SystemWindow.Start_Cur_STYLE = SystemWindow.GetWindowLong(this._hwnd, -20);
		}

		// Token: 0x17000002 RID: 2
		// (get) Token: 0x06000019 RID: 25 RVA: 0x00002725 File Offset: 0x00000925
		// (set) Token: 0x0600001A RID: 26 RVA: 0x0000274C File Offset: 0x0000094C
		public byte Alpha
		{
			get
			{
				SystemWindow.GetLayeredWindowAttributes(this._hwnd, out this.crKey, out this.bAlpha, out this.dwFlags);
				return this.bAlpha;
			}
			set
			{
				SystemWindow.GetLayeredWindowAttributes(this._hwnd, out this.crKey, out this.bAlpha, out this.dwFlags);
				uint num = 2U;
				if ((this.dwFlags & 1U) == 1U)
				{
					num |= 1U;
				}
				if ((this.ExtendedStyle & WindowExStyleFlags.LAYERED) == WindowExStyleFlags.LEFT)
				{
					this.ExtendedStyle |= WindowExStyleFlags.LAYERED;
				}
				SystemWindow.SetLayeredWindowAttributes(this._hwnd, this.crKey, value, num);
			}
		}

		// Token: 0x17000003 RID: 3
		// (get) Token: 0x0600001B RID: 27 RVA: 0x000027BC File Offset: 0x000009BC
		// (set) Token: 0x0600001C RID: 28 RVA: 0x000027E8 File Offset: 0x000009E8
		public Color ColorKey
		{
			get
			{
				SystemWindow.GetLayeredWindowAttributes(this._hwnd, out this.crKey, out this.bAlpha, out this.dwFlags);
				return Color.FromArgb(this.crKey);
			}
			set
			{
				SystemWindow.GetLayeredWindowAttributes(this._hwnd, out this.crKey, out this.bAlpha, out this.dwFlags);
				uint num = 1U;
				if ((this.dwFlags & 2U) == 2U)
				{
					num |= 2U;
				}
				if (value == Color.Transparent)
				{
					num = (uint)((ulong)num & 18446744073709551614UL);
				}
				if ((num & 1U) == 0U)
				{
					this.ExtendedStyle &= ~WindowExStyleFlags.LAYERED;
				}
				if ((this.ExtendedStyle & WindowExStyleFlags.LAYERED) == WindowExStyleFlags.LEFT)
				{
					this.ExtendedStyle |= WindowExStyleFlags.LAYERED;
				}
				SystemWindow.SetLayeredWindowAttributes(this._hwnd, value.ToArgb(), this.bAlpha, num);
			}
		}

		// Token: 0x17000004 RID: 4
		// (get) Token: 0x0600001D RID: 29 RVA: 0x0000288A File Offset: 0x00000A8A
		// (set) Token: 0x0600001E RID: 30 RVA: 0x00002897 File Offset: 0x00000A97
		public bool TopMost
		{
			get
			{
				return (this.ExtendedStyle & WindowExStyleFlags.TOPMOST) > WindowExStyleFlags.LEFT;
			}
			set
			{
				if (value)
				{
					SystemWindow.SetWindowPos(this._hwnd, SystemWindow.HWND_TOPMOST, 0, 0, 0, 0, 3U);
					return;
				}
				SystemWindow.SetWindowPos(this._hwnd, SystemWindow.HWND_NOTOPMOST, 0, 0, 0, 0, 3U);
			}
		}

		// Token: 0x17000005 RID: 5
		// (get) Token: 0x0600001F RID: 31 RVA: 0x000028C9 File Offset: 0x00000AC9
		public int BeginStyle
		{
			get
			{
				return SystemWindow.Start_Cur_STYLE;
			}
		}

		// Token: 0x06000020 RID: 32 RVA: 0x000028D0 File Offset: 0x00000AD0
		public void MakeBackgroundTransparent()
		{
			SystemWindow.MARGINS margins = new SystemWindow.MARGINS
			{
				cxLeftWidth = -1
			};
			SystemWindow.DwmExtendFrameIntoClientArea(this._hwnd, ref margins);
		}

		// Token: 0x06000021 RID: 33 RVA: 0x000028FD File Offset: 0x00000AFD
		public void MakeWindowNoBorder()
		{
			SystemWindow.SetWindowLong(this._hwnd, -16, SystemWindow.GetWindowLong(this._hwnd, -16) & -8388609 & -12582913);
		}

		// Token: 0x06000022 RID: 34 RVA: 0x00002926 File Offset: 0x00000B26
		public void WindowBorderRestore()
		{
			SystemWindow.SetWindowLong(this._hwnd, -16, 12582912);
		}

		// Token: 0x06000023 RID: 35 RVA: 0x0000293B File Offset: 0x00000B3B
		public void MakePenetrate()
		{
			SystemWindow.SetWindowLong(this._hwnd, -20, 524288);
			SystemWindow.SetWindowLong(this._hwnd, -20, 524320);
		}

		// Token: 0x06000024 RID: 36 RVA: 0x00002963 File Offset: 0x00000B63
		public void MakePenetrateRestore()
		{
			SystemWindow.SetWindowLong(this._hwnd, -20, 524288);
			SystemWindow.SetWindowLong(this._hwnd, -20, SystemWindow.Start_Cur_STYLE | 524288);
		}

		// Token: 0x06000025 RID: 37 RVA: 0x00002991 File Offset: 0x00000B91
		public void Activate()
		{
			if (this.WindowState == FormWindowState.Minimized)
			{
				SystemWindow.ShowWindow(this._hwnd, 9);
			}
			SystemWindow.ShowWindow(this._hwnd, 5);
			this.BringToFront();
		}

		// Token: 0x06000026 RID: 38 RVA: 0x000029BD File Offset: 0x00000BBD
		public bool IsFocus()
		{
			return SystemWindow.GetForegroundWindow() == this._hwnd;
		}

		// Token: 0x06000027 RID: 39 RVA: 0x000029D4 File Offset: 0x00000BD4
		public void Maximize()
		{
			this.WindowState = FormWindowState.Maximized;
		}

		// Token: 0x06000028 RID: 40 RVA: 0x000029DD File Offset: 0x00000BDD
		public void Minimize()
		{
			this.WindowState = FormWindowState.Minimized;
		}

		// Token: 0x06000029 RID: 41 RVA: 0x000029E6 File Offset: 0x00000BE6
		public void Restore()
		{
			this.WindowState = FormWindowState.Normal;
		}

		// Token: 0x17000006 RID: 6
		// (get) Token: 0x0600002A RID: 42 RVA: 0x000029EF File Offset: 0x00000BEF
		public bool Maximized
		{
			get
			{
				return this.WindowState == FormWindowState.Maximized;
			}
		}

		// Token: 0x17000007 RID: 7
		// (get) Token: 0x0600002B RID: 43 RVA: 0x000029FA File Offset: 0x00000BFA
		public bool Minimized
		{
			get
			{
				return this.WindowState == FormWindowState.Minimized;
			}
		}

		// Token: 0x17000008 RID: 8
		// (get) Token: 0x0600002C RID: 44 RVA: 0x00002A05 File Offset: 0x00000C05
		public bool Movable
		{
			get
			{
				return (this.Style & WindowStyleFlags.SYSMENU) > WindowStyleFlags.OVERLAPPED;
			}
		}

		// Token: 0x17000009 RID: 9
		// (get) Token: 0x0600002D RID: 45 RVA: 0x00002A16 File Offset: 0x00000C16
		public bool Resizable
		{
			get
			{
				return (this.Style & WindowStyleFlags.THICKFRAME) > WindowStyleFlags.OVERLAPPED;
			}
		}

		// Token: 0x1700000A RID: 10
		// (get) Token: 0x0600002E RID: 46 RVA: 0x00002A28 File Offset: 0x00000C28
		public SystemWindow WindowBelow
		{
			get
			{
				IntPtr window = SystemWindow.GetWindow(this._hwnd, 2U);
				if (window == IntPtr.Zero)
				{
					return null;
				}
				return new SystemWindow(window.ToString());
			}
		}

		// Token: 0x1700000B RID: 11
		// (get) Token: 0x0600002F RID: 47 RVA: 0x00002A60 File Offset: 0x00000C60
		public bool IsCloaked
		{
			get
			{
				bool flag = false;
				if (SystemWindow.DwmGetWindowAttribute(this._hwnd, SystemWindow.DWMWINDOWATTRIBUTE.Cloaked, out flag, Marshal.SizeOf<bool>(flag)) != 0)
				{
					flag = false;
				}
				return flag;
			}
		}

		// Token: 0x1700000C RID: 12
		// (get) Token: 0x06000030 RID: 48 RVA: 0x00002A8C File Offset: 0x00000C8C
		public SystemWindow WindowAbove
		{
			get
			{
				IntPtr window = SystemWindow.GetWindow(this._hwnd, 3U);
				if (window == IntPtr.Zero)
				{
					return null;
				}
				return new SystemWindow(window.ToString());
			}
		}

		// Token: 0x06000031 RID: 49 RVA: 0x00002AC1 File Offset: 0x00000CC1
		public WindowDeviceContext GetDeviceContext(bool clientAreaOnly)
		{
			if (clientAreaOnly)
			{
				return new WindowDeviceContext(this, SystemWindow.GetDC(this._hwnd));
			}
			return new WindowDeviceContext(this, SystemWindow.GetWindowDC(this._hwnd));
		}

		// Token: 0x06000032 RID: 50 RVA: 0x00002AE9 File Offset: 0x00000CE9
		public void SendClose()
		{
			this.SendSetMessage(16U, 0U);
		}

		// Token: 0x06000033 RID: 51 RVA: 0x00002AF4 File Offset: 0x00000CF4
		public void Refresh()
		{
			IntPtr hwnd = this._hwnd;
			SystemWindow parentSymmetric = this.ParentSymmetric;
			if (parentSymmetric != null)
			{
				hwnd = parentSymmetric._hwnd;
			}
			SystemWindow.InvalidateRect(hwnd, IntPtr.Zero, true);
			SystemWindow.RedrawWindow(hwnd, IntPtr.Zero, IntPtr.Zero, (SystemWindow.RDW)1921U);
		}

		// Token: 0x1700000D RID: 13
		// (get) Token: 0x06000034 RID: 52 RVA: 0x00002B3C File Offset: 0x00000D3C
		public SystemWindow ParentSymmetric
		{
			get
			{
				SystemWindow systemWindow = this.Parent;
				if (!this.IsDescendantOf(systemWindow))
				{
					systemWindow = null;
				}
				return systemWindow;
			}
		}

		// Token: 0x1700000E RID: 14
		// (get) Token: 0x06000035 RID: 53 RVA: 0x00002B5C File Offset: 0x00000D5C
		public SystemWindow Parent
		{
			get
			{
				return new SystemWindow(SystemWindow.GetParent(this._hwnd).ToString());
			}
		}

		// Token: 0x1700000F RID: 15
		// (get) Token: 0x06000036 RID: 54 RVA: 0x00002B84 File Offset: 0x00000D84
		// (set) Token: 0x06000037 RID: 55 RVA: 0x00002BCC File Offset: 0x00000DCC
		public FormWindowState WindowState
		{
			get
			{
				SystemWindow.WINDOWPLACEMENT windowplacement = default(SystemWindow.WINDOWPLACEMENT);
				windowplacement.length = Marshal.SizeOf<SystemWindow.WINDOWPLACEMENT>(windowplacement);
				SystemWindow.GetWindowPlacement(this._hwnd, ref windowplacement);
				int num = windowplacement.showCmd % 4;
				if (num == 2)
				{
					return FormWindowState.Minimized;
				}
				if (num != 3)
				{
					return FormWindowState.Normal;
				}
				return FormWindowState.Maximized;
			}
			set
			{
				switch (value)
				{
				case FormWindowState.Normal:
				{
					int nCmdShow = 1;
					SystemWindow.ShowWindow(this._hwnd, nCmdShow);
					return;
				}
				case FormWindowState.Minimized:
					this.SendMessage(274U, 61472U);
					return;
				case FormWindowState.Maximized:
				{
					int nCmdShow = 3;
					SystemWindow.ShowWindow(this._hwnd, nCmdShow);
					return;
				}
				default:
					return;
				}
			}
		}

		// Token: 0x06000038 RID: 56 RVA: 0x00002C1F File Offset: 0x00000E1F
		public void BringToFront()
		{
			SystemWindow.ForegroundWindow = this;
		}

		// Token: 0x17000010 RID: 16
		// (get) Token: 0x06000039 RID: 57 RVA: 0x00002C28 File Offset: 0x00000E28
		// (set) Token: 0x0600003A RID: 58 RVA: 0x00002C47 File Offset: 0x00000E47
		public static SystemWindow ForegroundWindow
		{
			get
			{
				return new SystemWindow(SystemWindow.GetForegroundWindow().ToString());
			}
			set
			{
				SystemWindow.SetForegroundWindow(value._hwnd);
			}
		}

		// Token: 0x17000011 RID: 17
		// (get) Token: 0x0600003B RID: 59 RVA: 0x00002C55 File Offset: 0x00000E55
		// (set) Token: 0x0600003C RID: 60 RVA: 0x00002C69 File Offset: 0x00000E69
		public WindowExStyleFlags ExtendedStyle
		{
			get
			{
				return (WindowExStyleFlags)((int)SystemWindow.GetWindowLongPtr(this._hwnd, -20));
			}
			set
			{
				SystemWindow.SetWindowLong(this._hwnd, -20, (int)value);
			}
		}

		// Token: 0x17000012 RID: 18
		// (get) Token: 0x0600003D RID: 61 RVA: 0x00002C7A File Offset: 0x00000E7A
		// (set) Token: 0x0600003E RID: 62 RVA: 0x00002C89 File Offset: 0x00000E89
		public WindowStyleFlags Style
		{
			get
			{
				return (WindowStyleFlags)SystemWindow.GetWindowLong32(this._hwnd, -16);
			}
			set
			{
				SystemWindow.SetWindowLong(this._hwnd, -16, (int)value);
			}
		}

        /// <summary>
        /// show TaskBar
        /// </summary>
        public static void ShowTaskBar()
        {
            SystemWindow.ShowWindow(FindWindow("Shell_TrayWnd", null), SW_RESTORE);
        }
        /// <summary>
        /// Hide TaskBar
        /// </summary>
        public static void HideTaskBar()
        {
            SystemWindow.ShowWindow(FindWindow("Shell_TrayWnd", null), SW_HIDE);
        }

        private const int SW_HIDE = 0;  //hied task bar
        private const int SW_RESTORE = 9;//show task bar

        // Token: 0x0600003F RID: 63
        [DllImport("user32.dll", SetLastError = true)]
		private static extern bool GetLayeredWindowAttributes(IntPtr hwnd, out int crKey, out byte bAlpha, out uint dwFlags);

		// Token: 0x06000040 RID: 64
		[DllImport("user32.dll")]
		private static extern bool SetLayeredWindowAttributes(IntPtr hwnd, int crKey, byte bAlpha, uint dwFlags);

		// Token: 0x06000041 RID: 65
		[DllImport("kernel32.dll", SetLastError = true)]
		private static extern IntPtr OpenProcess(SystemWindow.ProcessAccessFlags processAccess, bool bInheritHandle, int processId);

		// Token: 0x06000042 RID: 66 RVA: 0x00002C9A File Offset: 0x00000E9A
		public bool IsDescendantOf(SystemWindow ancestor)
		{
			return SystemWindow.IsChild(ancestor._hwnd, this._hwnd);
		}

		// Token: 0x06000043 RID: 67
		[DllImport("psapi.dll")]
		public static extern uint GetProcessImageFileName(IntPtr hProcess, [Out] StringBuilder lpImageFileName, [MarshalAs(UnmanagedType.U4)] [In] int nSize);

		// Token: 0x06000044 RID: 68
		[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
		[SuppressUnmanagedCodeSecurity]
		[DllImport("kernel32.dll", SetLastError = true)]
		[return: MarshalAs(UnmanagedType.Bool)]
		private static extern bool CloseHandle(IntPtr hObject);

		// Token: 0x06000045 RID: 69
		[DllImport("user32.dll")]
		private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

		// Token: 0x06000046 RID: 70
		[DllImport("Dwmapi.dll")]
		private static extern uint DwmExtendFrameIntoClientArea(IntPtr hWnd, ref SystemWindow.MARGINS margins);

		// Token: 0x06000047 RID: 71
		[DllImport("user32.dll", SetLastError = true)]
		public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);

		// Token: 0x06000048 RID: 72
		[DllImport("user32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		public static extern bool SetForegroundWindow(IntPtr hWnd);

		// Token: 0x06000049 RID: 73
		[DllImport("user32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		public static extern bool IsWindowUnicode(IntPtr hWnd);

		// Token: 0x0600004A RID: 74
		[DllImport("user32.dll")]
		public static extern IntPtr GetForegroundWindow();

		// Token: 0x0600004B RID: 75
		[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount);

		// Token: 0x0600004C RID: 76
		[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
		public static extern int GetWindowTextLength(IntPtr hWnd);

		// Token: 0x0600004D RID: 77
		[DllImport("user32.dll")]
		public static extern bool SetWindowText(IntPtr hWnd, string lpString);

		// Token: 0x0600004E RID: 78
		[DllImport("user32.dll")]
		public static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);

		// Token: 0x0600004F RID: 79
		[DllImport("user32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		private static extern bool EnumWindows(SystemWindow.EnumWindowsProc lpEnumFunc, IntPtr lParam);

		// Token: 0x06000050 RID: 80
		[DllImport("user32.dll")]
		public static extern bool IsWindowVisible(IntPtr hWnd);

		// Token: 0x06000051 RID: 81
		[DllImport("user32.dll")]
		public static extern bool IsWindowEnabled(IntPtr hWnd);

		// Token: 0x06000052 RID: 82
		[DllImport("user32.dll")]
		public static extern bool EnableWindow(IntPtr hWnd, bool bEnable);

		// Token: 0x06000053 RID: 83
		[DllImport("user32.dll")]
		private static extern int GetWindowLong(IntPtr hWnd, int nIndex);

		// Token: 0x06000054 RID: 84 RVA: 0x00002CAD File Offset: 0x00000EAD
		public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex)
		{
			if (IntPtr.Size == 8)
			{
				return SystemWindow.GetWindowLongPtr64(hWnd, nIndex);
			}
			return new IntPtr(SystemWindow.GetWindowLong32(hWnd, nIndex));
		}

		// Token: 0x06000055 RID: 85
		[DllImport("user32.dll", EntryPoint = "GetWindowLong")]
		public static extern int GetWindowLong32(IntPtr hWnd, int nIndex);

		// Token: 0x06000056 RID: 86
		[DllImport("user32.dll", EntryPoint = "GetWindowLongPtr")]
		public static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex);

		// Token: 0x06000057 RID: 87
		[DllImport("user32.dll")]
		private static extern bool GetWindowPlacement(IntPtr hWnd, ref SystemWindow.WINDOWPLACEMENT lpwndpl);

		// Token: 0x06000058 RID: 88
		[DllImport("user32.dll")]
		private static extern bool SetWindowPlacement(IntPtr hWnd, [In] ref SystemWindow.WINDOWPLACEMENT lpwndpl);

		// Token: 0x06000059 RID: 89
		[DllImport("user32.dll")]
		public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);

		// Token: 0x0600005A RID: 90
		[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
		public static extern IntPtr GetParent(IntPtr hWnd);

		// Token: 0x0600005B RID: 91
		[DllImport("user32.dll")]
		public static extern bool IsChild(IntPtr hWndParent, IntPtr hWnd);

		// Token: 0x0600005C RID: 92
		[DllImport("user32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		private static extern bool EnumChildWindows(IntPtr hwndParent, SystemWindow.EnumWindowsProc lpEnumFunc, IntPtr lParam);

		// Token: 0x0600005D RID: 93
		[DllImport("user32.dll", SetLastError = true)]
		public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);

		// Token: 0x0600005E RID: 94
		[DllImport("user32.dll")]
		public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

		// Token: 0x0600005F RID: 95
		[DllImport("user32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		public static extern bool IsIconic(IntPtr hWnd);

		// Token: 0x06000060 RID: 96
		[DllImport("gdi32.dll")]
		private static extern IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);

		// Token: 0x06000061 RID: 97
		[DllImport("user32.dll")]
		private static extern int GetWindowRgn(IntPtr hWnd, IntPtr hRgn);

		// Token: 0x06000062 RID: 98
		[DllImport("user32.dll")]
		private static extern int SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw);

		// Token: 0x06000063 RID: 99
		[DllImport("gdi32.dll")]
		private static extern bool BitBlt(IntPtr hObject, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hObjSource, int nXSrc, int nYSrc, int dwRop);

		// Token: 0x06000064 RID: 100
		[DllImport("user32.dll", SetLastError = true)]
		private static extern bool PrintWindow(IntPtr hwnd, IntPtr hDC, uint nFlags);

		// Token: 0x06000065 RID: 101
		[DllImport("user32.dll")]
		private static extern IntPtr GetWindowDC(IntPtr hWnd);

		// Token: 0x06000066 RID: 102
		[DllImport("user32.dll")]
		private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);

		// Token: 0x06000067 RID: 103
		[DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
		private static extern IntPtr CreateCompatibleDC(IntPtr hdc);

		// Token: 0x06000068 RID: 104
		[DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
		private static extern bool DeleteDC(IntPtr hdc);

		// Token: 0x06000069 RID: 105
		[DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
		private static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);

		// Token: 0x0600006A RID: 106
		[DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
		private static extern bool DeleteObject(IntPtr hObject);

		// Token: 0x0600006B RID: 107
		[DllImport("user32.dll", CharSet = CharSet.Auto)]
		internal static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

		// Token: 0x0600006C RID: 108
		[DllImport("user32.dll", CharSet = CharSet.Unicode)]
		internal static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, [Out] StringBuilder lParam);

		// Token: 0x0600006D RID: 109 RVA: 0x00002CCC File Offset: 0x00000ECC
		public long SendMessage(uint message, uint param)
		{
			return (long)SystemWindow.SendMessage(new HandleRef(this, this._hwnd), message, new IntPtr((long)((ulong)param)), new IntPtr(0)).ToInt32();
		}

		// Token: 0x0600006E RID: 110 RVA: 0x00002D01 File Offset: 0x00000F01
		internal int SendGetMessage(uint message)
		{
			return this.SendGetMessage(message, 0U);
		}

		// Token: 0x0600006F RID: 111 RVA: 0x00002D0C File Offset: 0x00000F0C
		internal int SendGetMessage(uint message, uint param)
		{
			return SystemWindow.SendMessage(new HandleRef(this, this._hwnd), message, new IntPtr((long)((ulong)param)), new IntPtr(0)).ToInt32();
		}

		// Token: 0x06000070 RID: 112 RVA: 0x00002D40 File Offset: 0x00000F40
		internal void SendSetMessage(uint message, uint value)
		{
			SystemWindow.SendMessage(new HandleRef(this, this._hwnd), message, new IntPtr((long)((ulong)value)), new IntPtr(0));
		}

		// Token: 0x06000071 RID: 113
		[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
		internal static extern IntPtr SendMessageTimeout(IntPtr windowHandle, uint Msg, IntPtr wParam, IntPtr lParam, SystemWindow.SendMessageTimeoutFlags flags, uint timeout, out IntPtr result);

		// Token: 0x06000072 RID: 114
		[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
		[return: MarshalAs(UnmanagedType.Bool)]
		internal static extern bool PostMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

		// Token: 0x06000073 RID: 115
		[DllImport("user32.dll", CharSet = CharSet.Ansi, EntryPoint = "SendMessageTimeout", SetLastError = true)]
		internal static extern uint SendMessageTimeoutText(IntPtr hWnd, int Msg, int countOfChars, StringBuilder text, SystemWindow.SendMessageTimeoutFlags flags, uint uTImeoutj, out IntPtr result);

		// Token: 0x06000074 RID: 116
		[DllImport("user32.dll")]
		public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);

		// Token: 0x06000075 RID: 117
		[DllImport("user32.dll")]
		private static extern IntPtr GetWindow(IntPtr hWnd, uint uCmd);

		// Token: 0x06000076 RID: 118
		[DllImport("user32.dll")]
		public static extern IntPtr GetDesktopWindow();

		// Token: 0x06000077 RID: 119
		[DllImport("user32.dll")]
		private static extern IntPtr GetDC(IntPtr hWnd);

		// Token: 0x06000078 RID: 120
		[DllImport("user32.dll", ExactSpelling = true)]
		private static extern IntPtr GetAncestor(IntPtr hwnd, SystemWindow.GetAncestorFlags flags);

		// Token: 0x06000079 RID: 121
		[DllImport("user32.dll")]
		[return: MarshalAs(UnmanagedType.Bool)]
		private static extern bool IsImmersiveProcess(IntPtr hWnd);

		// Token: 0x0600007A RID: 122
		[DllImport("user32.dll")]
		private static extern bool InvalidateRect(IntPtr hWnd, IntPtr lpRect, bool bErase);

		// Token: 0x0600007B RID: 123
		[DllImport("user32.dll")]
		private static extern bool RedrawWindow(IntPtr hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, SystemWindow.RDW flags);

		// Token: 0x0600007C RID: 124
		[DllImport("dwmapi.dll")]
		public static extern int DwmGetWindowAttribute(IntPtr hwnd, SystemWindow.DWMWINDOWATTRIBUTE dwAttribute, out bool pvAttribute, int cbAttribute);

		// Token: 0x04000071 RID: 113
		public IntPtr _hwnd;

		// Token: 0x04000072 RID: 114
		private int crKey;

		// Token: 0x04000073 RID: 115
		private byte bAlpha;

		// Token: 0x04000074 RID: 116
		private uint dwFlags;

		// Token: 0x04000075 RID: 117
		private static int Start_Cur_STYLE;

		// Token: 0x04000076 RID: 118
		private const int WM_GETTEXT = 13;

		// Token: 0x04000077 RID: 119
		private const int WM_GETTEXTLENGTH = 14;

		// Token: 0x04000078 RID: 120
		private const uint WS_EX_APPWINDOW = 262144U;

		// Token: 0x04000079 RID: 121
		private const uint WM_SYSCOMMAND = 274U;

		// Token: 0x0400007A RID: 122
		private const int SC_MINIMIZE = 61472;

		// Token: 0x0400007B RID: 123
		private const int SC_MAXIMIZE = 61488;

		// Token: 0x0400007C RID: 124
		private const int SC_CLOSE = 61536;

		// Token: 0x0400007D RID: 125
		private const int SC_KEYMENU = 61696;

		// Token: 0x0400007E RID: 126
		private const int SC_RESTORE = 61728;

		// Token: 0x0400007F RID: 127
		private const int SC_CONTEXTHELP = 61824;

		// Token: 0x04000080 RID: 128
		private static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);

		// Token: 0x04000081 RID: 129
		private static readonly IntPtr HWND_NOTOPMOST = new IntPtr(-2);

		// Token: 0x04000082 RID: 130
		private static readonly IntPtr HWND_TOP = new IntPtr(0);

		// Token: 0x04000083 RID: 131
		private static readonly IntPtr HWND_BOTTOM = new IntPtr(1);

		// Token: 0x04000084 RID: 132
		private static readonly uint EM_GETPASSWORDCHAR = 210U;

		// Token: 0x04000085 RID: 133
		private static readonly uint EM_SETPASSWORDCHAR = 204U;

		// Token: 0x04000086 RID: 134
		private static readonly uint BM_GETCHECK = 240U;

		// Token: 0x04000087 RID: 135
		private static readonly uint BM_SETCHECK = 241U;

		// Token: 0x04000088 RID: 136
		private const uint GW_HWNDNEXT = 2U;

		// Token: 0x04000089 RID: 137
		private const uint GW_HWNDPREV = 3U;

		// Token: 0x0400008A RID: 138
		private const int WM_CLOSE = 16;

		// Token: 0x0200000F RID: 15
		private struct WINDOWPLACEMENT
		{
			// Token: 0x04000098 RID: 152
			public int length;

			// Token: 0x04000099 RID: 153
			public int flags;

			// Token: 0x0400009A RID: 154
			public int showCmd;

			// Token: 0x0400009B RID: 155
			public Point ptMinPosition;

			// Token: 0x0400009C RID: 156
			public Point ptMaxPosition;

			// Token: 0x0400009D RID: 157
			public Rectangle rcNormalPosition;
		}

		// Token: 0x02000010 RID: 16
		private struct MARGINS
		{
			// Token: 0x0400009E RID: 158
			public int cxLeftWidth;

			// Token: 0x0400009F RID: 159
			public int cxRightWidth;

			// Token: 0x040000A0 RID: 160
			public int cyTopHeight;

			// Token: 0x040000A1 RID: 161
			public int cyBottomHeight;
		}

		// Token: 0x02000011 RID: 17
		[Flags]
		private enum ProcessAccessFlags : uint
		{
			// Token: 0x040000A3 RID: 163
			All = 2035711U,
			// Token: 0x040000A4 RID: 164
			Terminate = 1U,
			// Token: 0x040000A5 RID: 165
			CreateThread = 2U,
			// Token: 0x040000A6 RID: 166
			VirtualMemoryOperation = 8U,
			// Token: 0x040000A7 RID: 167
			VirtualMemoryRead = 16U,
			// Token: 0x040000A8 RID: 168
			VirtualMemoryWrite = 32U,
			// Token: 0x040000A9 RID: 169
			DuplicateHandle = 64U,
			// Token: 0x040000AA RID: 170
			CreateProcess = 128U,
			// Token: 0x040000AB RID: 171
			SetQuota = 256U,
			// Token: 0x040000AC RID: 172
			SetInformation = 512U,
			// Token: 0x040000AD RID: 173
			QueryInformation = 1024U,
			// Token: 0x040000AE RID: 174
			QueryLimitedInformation = 4096U,
			// Token: 0x040000AF RID: 175
			Synchronize = 1048576U
		}

		// Token: 0x02000012 RID: 18
		// (Invoke) Token: 0x0600008E RID: 142
		private delegate int EnumWindowsProc(IntPtr hWnd, IntPtr lParam);

		// Token: 0x02000013 RID: 19
		private enum GWL
		{
			// Token: 0x040000B1 RID: 177
			GWL_WNDPROC = -4,
			// Token: 0x040000B2 RID: 178
			GWL_HINSTANCE = -6,
			// Token: 0x040000B3 RID: 179
			GWL_HWNDPARENT = -8,
			// Token: 0x040000B4 RID: 180
			GWL_STYLE = -16,
			// Token: 0x040000B5 RID: 181
			GWL_EXSTYLE = -20,
			// Token: 0x040000B6 RID: 182
			GWL_USERDATA = -21,
			// Token: 0x040000B7 RID: 183
			GWL_ID = -12
		}

		// Token: 0x02000014 RID: 20
		private enum TernaryRasterOperations : uint
		{
			// Token: 0x040000B9 RID: 185
			SRCCOPY = 13369376U,
			// Token: 0x040000BA RID: 186
			SRCPAINT = 15597702U,
			// Token: 0x040000BB RID: 187
			SRCAND = 8913094U,
			// Token: 0x040000BC RID: 188
			SRCINVERT = 6684742U,
			// Token: 0x040000BD RID: 189
			SRCERASE = 4457256U,
			// Token: 0x040000BE RID: 190
			NOTSRCCOPY = 3342344U,
			// Token: 0x040000BF RID: 191
			NOTSRCERASE = 1114278U,
			// Token: 0x040000C0 RID: 192
			MERGECOPY = 12583114U,
			// Token: 0x040000C1 RID: 193
			MERGEPAINT = 12255782U,
			// Token: 0x040000C2 RID: 194
			PATCOPY = 15728673U,
			// Token: 0x040000C3 RID: 195
			PATPAINT = 16452105U,
			// Token: 0x040000C4 RID: 196
			PATINVERT = 5898313U,
			// Token: 0x040000C5 RID: 197
			DSTINVERT = 5570569U,
			// Token: 0x040000C6 RID: 198
			BLACKNESS = 66U,
			// Token: 0x040000C7 RID: 199
			WHITENESS = 16711778U
		}

		// Token: 0x02000015 RID: 21
		private enum GetWindowRegnReturnValues
		{
			// Token: 0x040000C9 RID: 201
			ERROR,
			// Token: 0x040000CA RID: 202
			NULLREGION,
			// Token: 0x040000CB RID: 203
			SIMPLEREGION,
			// Token: 0x040000CC RID: 204
			COMPLEXREGION
		}

		// Token: 0x02000016 RID: 22
		[Flags]
		internal enum SendMessageTimeoutFlags : uint
		{
			// Token: 0x040000CE RID: 206
			SMTO_NORMAL = 0U,
			// Token: 0x040000CF RID: 207
			SMTO_BLOCK = 1U,
			// Token: 0x040000D0 RID: 208
			SMTO_ABORTIFHUNG = 2U,
			// Token: 0x040000D1 RID: 209
			SMTO_NOTIMEOUTIFNOTHUNG = 8U,
			// Token: 0x040000D2 RID: 210
			SMTO_ERRORONEXIT = 32U
		}

		// Token: 0x02000017 RID: 23
		private enum GetAncestorFlags
		{
			// Token: 0x040000D4 RID: 212
			GetParent = 1,
			// Token: 0x040000D5 RID: 213
			GetRoot,
			// Token: 0x040000D6 RID: 214
			GetRootOwner
		}

		// Token: 0x02000018 RID: 24
		private enum GetWindow_Cmd
		{
			// Token: 0x040000D8 RID: 216
			GW_HWNDFIRST,
			// Token: 0x040000D9 RID: 217
			GW_HWNDLAST,
			// Token: 0x040000DA RID: 218
			GW_HWNDNEXT,
			// Token: 0x040000DB RID: 219
			GW_HWNDPREV,
			// Token: 0x040000DC RID: 220
			GW_OWNER,
			// Token: 0x040000DD RID: 221
			GW_CHILD,
			// Token: 0x040000DE RID: 222
			GW_ENABLEDPOPUP
		}

		// Token: 0x02000019 RID: 25
		private enum RDW : uint
		{
			// Token: 0x040000E0 RID: 224
			RDW_INVALIDATE = 1U,
			// Token: 0x040000E1 RID: 225
			RDW_INTERNALPAINT,
			// Token: 0x040000E2 RID: 226
			RDW_ERASE = 4U,
			// Token: 0x040000E3 RID: 227
			RDW_VALIDATE = 8U,
			// Token: 0x040000E4 RID: 228
			RDW_NOINTERNALPAINT = 16U,
			// Token: 0x040000E5 RID: 229
			RDW_NOERASE = 32U,
			// Token: 0x040000E6 RID: 230
			RDW_NOCHILDREN = 64U,
			// Token: 0x040000E7 RID: 231
			RDW_ALLCHILDREN = 128U,
			// Token: 0x040000E8 RID: 232
			RDW_UPDATENOW = 256U,
			// Token: 0x040000E9 RID: 233
			RDW_ERASENOW = 512U,
			// Token: 0x040000EA RID: 234
			RDW_FRAME = 1024U,
			// Token: 0x040000EB RID: 235
			RDW_NOFRAME = 2048U
		}

		// Token: 0x0200001A RID: 26
		public enum DWMWINDOWATTRIBUTE : uint
		{
			// Token: 0x040000ED RID: 237
			NCRenderingEnabled = 1U,
			// Token: 0x040000EE RID: 238
			NCRenderingPolicy,
			// Token: 0x040000EF RID: 239
			TransitionsForceDisabled,
			// Token: 0x040000F0 RID: 240
			AllowNCPaint,
			// Token: 0x040000F1 RID: 241
			CaptionButtonBounds,
			// Token: 0x040000F2 RID: 242
			NonClientRtlLayout,
			// Token: 0x040000F3 RID: 243
			ForceIconicRepresentation,
			// Token: 0x040000F4 RID: 244
			Flip3DPolicy,
			// Token: 0x040000F5 RID: 245
			ExtendedFrameBounds,
			// Token: 0x040000F6 RID: 246
			HasIconicBitmap,
			// Token: 0x040000F7 RID: 247
			DisallowPeek,
			// Token: 0x040000F8 RID: 248
			ExcludedFromPeek,
			// Token: 0x040000F9 RID: 249
			Cloak,
			// Token: 0x040000FA RID: 250
			Cloaked,
			// Token: 0x040000FB RID: 251
			FreezeRepresentation
		}

		// Token: 0x0200001B RID: 27
		[Flags]
		public enum SetWindowPosFlags
		{
			// Token: 0x040000FD RID: 253
			SWP_NOSIZE = 1,
			// Token: 0x040000FE RID: 254
			SWP_NOMOVE = 2,
			// Token: 0x040000FF RID: 255
			SWP_NOZORDER = 4,
			// Token: 0x04000100 RID: 256
			SWP_NOREDRAW = 8,
			// Token: 0x04000101 RID: 257
			SWP_NOACTIVATE = 16,
			// Token: 0x04000102 RID: 258
			SWP_FRAMECHANGED = 32,
			// Token: 0x04000103 RID: 259
			SWP_DRAWFRAME = 32,
			// Token: 0x04000104 RID: 260
			SWP_SHOWWINDOW = 64,
			// Token: 0x04000105 RID: 261
			SWP_HIDEWINDOW = 128,
			// Token: 0x04000106 RID: 262
			SWP_NOCOPYBITS = 256,
			// Token: 0x04000107 RID: 263
			SWP_NOOWNERZORDER = 512,
			// Token: 0x04000108 RID: 264
			SWP_NOREPOSITION = 512,
			// Token: 0x04000109 RID: 265
			SWP_NOSENDCHANGING = 1024,
			// Token: 0x0400010A RID: 266
			SWP_DEFERERASE = 8192,
			// Token: 0x0400010B RID: 267
			SWP_ASYNCWINDOWPOS = 16384
		}
	}
}
